<?php

namespace app\wap\model\order;

use think\Model;

class Order  extends Model
{
    protected $autoWriteTimestamp = 'datetime';
    protected $json = ['goods_info','address_info'];
    protected $jsonAssoc = true;

    public  function addOrder($add){
        $order= new order();
        try {
            $order->startTrans();
            $order->create($add);
            $order->commit();
        }catch (\Throwable $throwable){

            $order->rollback();

            return false;
        }



    }


}